import { createStore } from 'vuex'

export default createStore({
	state:{
		statusBarHeight:55,
		role:{
			roleId:1,
			roleName:'质检员',
		},
	},
	mutations:{
		// 设置状态栏高度
		SET_STATUSBARHEIGHT(state,data){
			state.statusBarHeight = data
		},
		// 设置角色信息（切换）
		SET_ROLE(state,data){
			state.role = data
		},
	},
	getters:{
		statusBarHeight:(state)=>state.statusBarHeight,
		role:(state)=>state.role
	}
})